home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Pascal / Snippets / Demo / Readme < prev   
Text File  |  1997-07-22  |  2KB  |  36 lines

  1. IconCache.p
  2.  
  3. This unit keeps a linked list of colour icons and their IDs. It provides functions to get or plot an icon out of this list. If the icon you want to plot is not in the list it is loaded and added to the list. You can empty the whole list.
  4.  
  5. This provides a very quick and easy way to access colour icons (for example as buttons) in your program without worrying about memory or load speed.
  6.  
  7.  
  8. IconButtons.p
  9.  
  10. This unit uses IconCache.p to implement simple cicn-buttons. You provide icons for the "body" (the background) of the button, the highlighted (pressed) state of the body and for the "face" (the picture on the button). The unit provides functions for drawing, hit-testing and tracking clicks onto the buttons.
  11.  
  12.  
  13. OffscreenUtils.p
  14.  
  15. This unit provides procedures that let you draw offscreen and copy the image to the screen to avoid flickering. The code in this unit can be plugged into already-written code quite easily: you just have to bracket your code with calls to StartDrawingOffscreen and CopyOffscreenToScreen. You just pass the rectangle of the area you want to draw, and a previously allocated "offscreen area".
  16.  
  17.  
  18. GraySlider.p
  19.  
  20. This unit manages a gray slider. It uses OffscreenUtils.p for flicker-free drawing. To create a "GraySlider", you just have to pass its direction (axis ), its location (bodyRect ), the ID of various PICT and cicn-resources describing its appearance (bodyPictID, indicatorCicnID, selectedIndicatorCicnID ) and minimum, maximum and current setting values. Resources for the gray slider described by the Apple Grayscale Appearance are included.
  21.  
  22.  
  23. Demo.p
  24.  
  25. Source code for a small application that shows a window that uses all units. It contains no error checking and only a small, for real applications insufficient event loop.
  26.  
  27.  
  28. This code is Freeware. You may use it in your own projects, regardless if commercial or non-commercial, but I strongly encourage you to give me credits in your about-box.
  29.  
  30. If you have got questions or want to contact me, you can e-mail me at <mailto:matthias@kagi.com>.
  31.  
  32. Matthias Wuttke
  33. Hilterweg 14, D-33803 Steinhagen, Germany
  34. +49 (0) 5204 8502
  35. http://www.kagi.com/authors/matthias
  36. matthias@kagi.com, wuttke@stein.teuto.de